# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html

import scrapy
from scrapy import Field

class BookItem(scrapy.Item):
    isbn = Field()

    pid = Field()#网站的书id
    title = Field()#书名
    type = Field()#书类型
    author = Field()#作者
    press = Field()#出版社
    star = Field()#百分制；评分，注意0-5和0-10的转换
    price = Field()#价格
    field = Field() # 域名
    link = Field() #链接
    img_link = Field()
    pub_time = Field()#出版时间

class LinkItem(scrapy.Item):
    '''
    表示书之间的联系，说明之间有相关性
    '''
    pid = Field()
    link_pid = Field()

    relation = Field()#1表示也买过，2表示也看过，其他为默认值